package com.lotea.android.andreaditlater.ui.adapters;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.lotea.android.andreaditlater.R;
import com.lotea.android.andreaditlater.ui.widgets.ReadListItem;

public class MockItemListAdapter extends BaseAdapter {

	private final LayoutInflater mInflater;

	public MockItemListAdapter(Context ctx) {
		mInflater = LayoutInflater.from(ctx);
	}

	@Override
	public int getCount() {
		return 50;
	}

	@Override
	public Object getItem(int position) {
		return position;
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ReadListItem view;

		if (convertView != null) {
			view = (ReadListItem) convertView;
		} else {
			view = (ReadListItem) mInflater.inflate(R.layout.read_list_item,
					null);
		}

//		 if (position % 3 == 0) {
//			 view.markAsRead();
//		 } else {
//			 view.markAsUnread();
//		 }

		return view;
	}
}
